﻿<?php
	//
	$sqlType	= "MYSQL";	//定义数据库类型
	$hostname	= "localhost";	//服务器的IP地址 或 服务器的名字 
	$dbuser		= "root";		//服务器的帐号 
	$dbpasswd	= "";	//服务器的密码 
	$dbname		= "pvg_test";	//数据库的名字 
	
	
		//echo "db.php MYSQL connection!<br />";
		$conn = mysql_connect($hostname, $dbuser, $dbpasswd);
		// 注意判断 $conn 可能为空！
		$var = empty($conn);
		//echo '$conn='.$var.'<br />';
			
		mysql_select_db($dbname) or die("can't use".$dbname );
		$dbcharset = "utf8"; 
		mysql_query("SET character_set_connection=".$dbcharset.", character_set_results=".$dbcharset.", character_set_client=binary");
		/*
		$sql = "select * from t_text";
		$data = mysql_query($sql, $conn);
		while ($arr = mysql_fetch_array($data))
		{
			echo "$arr[t_ques]<br />";
		}
		mysql_close($conn);
		*/

?>